package com.android.plc.classholder;

import com.android.plc.util.StringUtil;

public class ProfileDetail extends BasicItem
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7475775421895507710L;
	public int home_unit;
	public int command;
	public int data1;
	public int data2;

	public ProfileDetail(Type type)
	{
		super(type);
	}

	public ProfileDetail(int home_unit, int command)
	{
		super(Type.NORMAL_ITEM);
		this.home_unit = home_unit;
		this.command = command;
		this.data1 = 0;
		this.data2 = 0;
	}

	public String getHomeUnit()
	{
		return StringUtil.convCode(home_unit / 16) + home_unit % 16;
	}

	@Override
	public String toString()
	{
		return String.format("%x %x %x %x", this.home_unit, this.command, this.data1, this.data2);
	}
}
